package com.oa.cms.controller.api;

import com.oa.cms.domain.dto.CmsConfigureDto;
import com.oa.cms.query.CmsConfigureQuery;
import com.oa.cms.query.base.Page;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created by gold-jx on 2017/12/7.
 */
@RequestMapping("configure")
public interface CmsConfigureApi {

    @ApiOperation(value = "【管端】CMS配置新增", notes = "add the cms configure", response = CmsConfigureDto.class, tags = {"CMS - Configure",})
    @ApiResponse(code = 200, message = "配置新增成功！")
    @RequestMapping(value = "/add/", method = RequestMethod.POST)
    ResponseEntity<Void> addCmsConfigure(@ApiParam(value = "CMS配置新增",required = true)  @RequestBody CmsConfigureDto cmsConfigureDto);


    @ApiOperation(value = "【管端】CMS配置修改", notes = "update the cms configure", response = CmsConfigureDto.class, tags = {"CMS - Configure",})
    @ApiResponse(code = 200, message = "配置修改成功！")
    @RequestMapping(value = "/update/", method = RequestMethod.POST)
    ResponseEntity<Void> updateCmsConfigure(@ApiParam(value = "CMS版本修改",required = true)  @RequestBody CmsConfigureDto cmsConfigureDto);


    @ApiOperation(value = "【管端】【真】CMS配置删除", notes = "real delete the cms configure", response = CmsConfigureDto.class, tags = {"CMS - Configure",})
    @ApiResponse(code = 200, message = "配置删除成功！")
    @RequestMapping(value = "/realDelete/", method = RequestMethod.POST)
    ResponseEntity<Void> deleteRealCmsConfigure(@ApiParam(value = "CMS版本真删除",required = true) @RequestBody String id);

    @ApiOperation(value = "【管端】【假】CMS配置删除", notes = "false delete the cms configure", response = CmsConfigureDto.class, tags = {"CMS - Configure",})
    @ApiResponse(code = 200, message = "配置删除成功！")
    @RequestMapping(value = "/falseDelete/", method = RequestMethod.POST)
    ResponseEntity<Void> deleteFalseCmsConfigure(@ApiParam(value = "CMS版本假删除",required = true) @RequestBody String id);


    @ApiOperation(value = "【管端】 CMS配置列表", notes = "List the cms configure", response = CmsConfigureDto.class, tags = {"CMS - Configure",})
    @ApiResponses(value = {@ApiResponse(code = 200, message = "Successful response", response = CmsConfigureDto.class)})
    @RequestMapping(value = "/getConfigure/", method = RequestMethod.GET)
    ResponseEntity<Page<CmsConfigureDto>> getConfigure(CmsConfigureQuery cmsConfigureQuery);

}
